<?php

namespace backend\models\course;

use Yii;

/**
 * This is the model class for table "edu_course_cart".
 *
 * @property integer $cart_id
 * @property integer $user_id
 * @property integer $course_id
 * @property string $course_name
 * @property string $price
 * @property integer $addtime
 */
class CourseCart extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'edu_course_cart';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'course_id', 'addtime'], 'integer'],
            [['price'], 'number'],
            [['course_name'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'cart_id' => 'Cart ID',
            'user_id' => 'User ID',
            'course_id' => 'Course ID',
            'course_name' => 'Course Name',
            'price' => 'Price',
            'addtime' => 'Addtime',
        ];
    }
}
